<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="${_ctx}">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>首页</title>
<link rel="stylesheet" type="text/css" href="css/htmaincs.css"/>
		<script type="text/javascript" src="js/jquery-2.2.3.min.js"></script>
		<script type="text/javascript" src="js/frappe-charts.min.iife.js"></script>
		<script>
			$(function(){
				let chart = new Chart( "#chart", { // or DOM element
				data: {
				  labels: ["一月", "二月", "三月", "四月",
				  "五月", "六月", "七月", "八月","九月","十月","十一月","十二月"],

				  datasets: [
					{
					  label: "Some Data", type: 'bar',
					  values: ${xlarr}
					},
					
				  ],
				  yMarkers: [{ label: "Marker", value: 70 }],
				  yRegions: [{ label: "Region", start: -10, end: 50 }]
				},

				title: "去年销量统计",
				type: 'axis-mixed', // or 'bar', 'line', 'pie', 'percentage'
				height: 233,
				colors: ['purple']
			  });
				
				
			})
		</script>
	</head>
	<body class="gray-bg">
		<div id="wrapper-content">
			<div class="row">
				<div class="text-center">
					<div class="col-xs-6">
						<div class="panel padder-v">
							<div class="h1 text-info font-thin">
								${commcount}
							</div>
							<span class="text-muted">商品总数</span>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="panel padder-v bg-info">
							<div class="h1  font-thin">
								${ucount}
							</div>
							<span class="text-muted">用户数量</span>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="panel padder-v bg-primary">
							<div class="h1  font-thin">
								${daycount}
							</div>
							<span class="text-muted">今日销量</span>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="panel padder-v">
							<div class="h1 font-thin">
								${dayprice}
							</div>
							<span class="text-muted">今日盈利(￥)</span>
						</div>
					</div>
				</div>
			</div>
			<div class="col-sm-8">
				<div id="chart"></div>
			</div>
		</div>
		<div class="box-info">
			<div class="box-header">
				<img src="imgs/htimgs/all.png" />
				<h3 class="box-title">最新10条等待处理订单</h3>
			</div>
			<div class="box-body">
				<table class="box-table">
					<thead>
						<tr>
							<th>订单号</th>
							<th>收货人</th>
							<th>订单状态</th>
							<th>金额</th>
							<th>下单时间</th>
							<th>操作</th>
						</tr>
					</thead>
					<c:forEach var="order"  items="${orderslist}" >
					<tr>
                       <td>${order.orid}</td>
                       <td>${order.oruser}</td>
                       <td class="orstatus">${order.orstatus}</td>
                       <td><b class="text-red">￥${order.orprice}</b></td>
                       <td>${order.ortime}</td>
                       <td>
							<a href="htmain?v=htorderxq&orid=${order.orid}">
								<img src="imgs/htimgs/spbianji.png" style="width: 24px;height: 24px;" />
							</a>
                       </td>
                    </tr>
					</c:forEach>
				</table>
			</div>
		</div>
	</body>
</html>